<template>
  <div class="weekend">
    <div class="weekend-title">{{ name }}</div>
    <ul>
      <li class="item border-bottom" v-for="item in list" :key="item.id">
        <div class="item-img-wrapper">
          <img :src="item.imgUrl" alt="" class="item-img" />
        </div>
        <div class="item-info">
          <p class="item-title">{{ item.title }}</p>
          <p class="item-desc">{{ item.desc }}</p>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  props: {
    list: Array
  },
  data() {
    return {
      name: "周末去哪儿"
    };
  }
};
</script>

<style lang="stylus" scoped>
@import '~@/assets/styles/varibles.styl'

.weekend-title {
  height: 0.8rem
  line-height: 0.8rem
  background-color: #eee
  text-indent: 0.2rem
}
.item {
  .item-img-wrapper {
    height: 0
    overflow: hidden
    padding-bottom: 37%
  }
  .item-img {
    width: 100%
  }
  .item-info {
    padding: 0.2rem
    .item-title {
      line-height: 0.4rem
      font-size: 0.26rem
      ellipsis()
    }
    .item-desc {
      line-height: 0.4rem
      font-size: 0.18rem
      ellipsis()
      color: #616161
    }
  }
}
</style>
